<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
    <title></title>
    <link rel="stylesheet" type="text/css" href="css/base.css"/>
    <link rel="stylesheet" type="text/css" href="css/index.css"/>
    <link rel="stylesheet" type="text/css" href="http://at.alicdn.com/t/font_425307_c65vlgxeb691kyb9.css"/>
</head>
<style type="text/css">
	.header{
		width: 100%;
		height: 0.8rem;
		line-height: 0.8rem;
		background: #fff;
		text-align: center;
		font-size: 0.28rem;
		border-bottom: 0.01rem solid #F6F6F6;
		position: fixed;
		top: 0;
		left: 0;
	}
	.icon-icon{
		position: absolute;
		left: 0.2rem;
		top: 0;
		font-size: 0.4rem;
		color: #404040;
	}
	.rongcuo{
		width: 100%;
		height: 4rem;
		text-align: center;
		margin-top: 3rem;
		display: none;
	}
	.rongcuo i{
		font-size: 2rem;
	}
	.rongcuo p{
		margin-top: 0.5rem;
	}
</style>
<body>
	<div class="header">
		<i class="iconfont icon-icon"></i>
		景点推荐
	</div>
	<div style="height: 0.8rem;"></div>
	<ul class="ul_warp">
		
	</ul>
	<div class="rongcuo">
		<i class="iconfont icon-wuneirong"></i>
		<p>暂无推荐内容</p>
	</div>
</body>
<script src="js/jquery-3.1.1.min.js" type="text/javascript" charset="utf-8"></script>
<script type="text/javascript">
	$.ajax({
		type:"post",
		url:"http://web.tl178.cn/Radio/road_scenic",
		async:true,
		data:{
			road_Id:localStorage.getItem("recomId")
		},
		success:function(data){
			var data = JSON.parse(data)
			console.log(data)
			if(data["status"]!=1 || !data["list"]){
				$(".rongcuo").show()
			}else{
				$(".rongcuo").hide()
			var $li =""
			for(var i=0;i<data["list"].length;i++){
				$li += "<li class='liList' data-info="+data["list"][i]['Id']+"><a href='javascript:;'><img src='"+data['list'][i]['feng_img']+"'/></a><div class='li_foot'><p>"+data["list"][i]['feng_title']+"</p></div></li>"
			}
			$(".ul_warp").append($li)
			 $(".liList").each(function(){
			      $(this).click(function(){
			      	 localStorage.setItem("routeId",$(this).attr("data-info"))    
			         window.location.href = "views/info.html"
			      });
				})
			} 
		}
			
	});
	$(".icon-icon").click(function(){
		history.back()
	})
</script>
</html>